package com.gf.forcesystem.service.uavstate;

import com.gf.forcesystem.model.dto.UAVState;
import com.gf.forcesystem.api.UavStateService;
import com.gf.forcesystem.websocket.ForceClientWebsocketManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author gaofei
 * @date 2022/6/19 19:50
 * 将无人机信息广播给客户端
 */
@Service("BroadUavStateServiceImpl")
public class BroadUavStateServiceImpl implements UavStateService {
    @Autowired
    ForceClientWebsocketManager forceClientWebsocketManager;

    @Override
    public void deal(UAVState uavState) {
        forceClientWebsocketManager.broadcastMessage(uavState);
    }
}
